/******************************************************************************
 * @File name   :      ICouponBatchService.java
 *
 * @Author      :      JIZHANGS
 *
 * @Date        :      Sep 8, 2015
 *
 * @Copyright Notice: 
 * Copyright (c) 2015 Capgemini, Inc. All  Rights Reserved.
 * This software is published under the terms of the Capgemini Software
 * License version 1.0, a copy of which has been included with this
 * distribution in the LICENSE.txt file.
 * 
 * 
 * ----------------------------------------------------------------------------
 * Date                   Who         Version        Comments
 * Sep 8, 2015 3:38:41 PM        JIZHANGS     1.0            Initial Version
 *****************************************************************************/
package com.cap.bts.crmdp.dealer.coupon.service;

import java.io.File;
import java.util.List;

import com.cap.bts.crmdp.dealer.coupon.domain.CouponBatch;
import com.cap.bts.crmdp.dealer.coupon.domain.CouponBatchLine;
import com.cap.bts.crmdp.dealer.coupon.domain.CouponRedeem;
import com.cap.bts.crmdp.dealer.coupon.dto.CouponBatchDto;
import com.cap.bts.crmdp.dealer.coupon.dto.CouponForMARSDto;
import com.cap.bts.crmdp.dealer.coupon.dto.RedeemCouponSubmitDto;
import com.cap.bts.crmdp.dealer.mars.dto.AjaxResponse;
import com.cap.bts.crmdp.dealer.mars.dto.CouponRedeemtionDto;
import com.cap.bts.framework.common.exception.AppException;
import com.cap.bts.framework.common.service.IBaseService;

/**
 *优惠券活动批次
 */
public interface ICouponBatchService extends IBaseService {
   
    /**
     * 取得带分页的活动批次列表
     * @Date        :      Sep 9, 2015
     * @param dto
     * @return
     * @throws AppException
     */
    public CouponBatchDto getCouponBatchAllList(CouponBatchDto dto) throws AppException;
    
    /**
     * 取得带分页的导出活动批次列表
     * @Date        :      Sep 9, 2015
     * @param dto
     * @return
     * @throws AppException
     */
    public CouponBatchDto getExportCouponBatchAllList(CouponBatchDto dto) throws AppException;
    
    /**
     * 根据查询条件取得带分页的活动批次列表
     * @Date        :      2015年9月16日
     * @param dto
     * @return
     * @throws AppException
     */
    public CouponBatchDto getCouponBatchListwithQuery(CouponBatchDto dto) throws AppException;
    
    /**
     * 根据查询条件取得带分页的导出活动批次列表
     * @Date        :      2015年9月16日
     * @param dto
     * @return
     * @throws AppException
     */
    public CouponBatchDto getExportCouponBatchListwithQuery(CouponBatchDto dto) throws AppException;
    
    /**
     * 新增活动批次
     * @Date        :      Sep 9, 2015
     * @param dto
     * @return
     * @throws AppException
     */
    public CouponBatch addCouponBatch(CouponBatch dto) throws AppException;
    
    /**
     * 根据Id删除活动批次
     * @Date        :      Sep 9, 2015
     * @param dto
     * @return
     * @throws AppException
     */
    public void deleteCouponBatch(Long id) throws AppException;
    
    /**
     * 根据Id取得活动批次
     * @Date        :      Sep 9, 2015
     * @param dto
     * @return
     * @throws AppException
     */
    public CouponBatch getCouponBatchById(Long id) throws AppException;
    
    /**
     * 编辑更新活动批次
     * @Date        :      Sep 9, 2015
     * @param dto
     * @return
     * @throws AppException
     */
    public void updateCouponBatch(CouponBatch cb) throws AppException;
    
    /**
     * 按活动批次取得优惠券生成列表
     * @Date        :      Sep 10, 2015
     * @return
     * @throws AppException
     */
    public List<CouponBatchLine> getCouponBatchLineListByBatchId(Long batchId) throws AppException;

    /**
     * 按活动批次添加生成优惠券
     * @Date        :      Sep 10, 2015
     * @return
     * @throws AppException
     */
    public CouponBatchLine addGenerateCoupon(CouponBatchLine couponBatchLine) throws AppException;
    
    
    /**
     * 按活动批次删除生成优惠券
     * @Date        :      Sep 10, 2015
     * @return
     * @throws AppException
     */
    public void deleteGenerateCoupon(Long id) throws AppException;
    
    /**
     * 生成优惠券
     * @Date        :      Sep 10, 2015
     * @return
     * @throws AppException
     */
    public Boolean generateCoupon(String generateInfo) throws AppException;
    
    /**
     * 使用优惠券
     * @Date        :      Sep 10, 2015
     * @return
     * @throws AppException
     */
    public Boolean redeemCoupon(RedeemCouponSubmitDto dto)  throws AppException;
    
    /**
     * 生成优惠券CSV
     * @Date        :      Sep 10, 2015
     * @return
     * @throws AppException
     */
    public File generateCSVfile(Long batchId,Long ticketId) throws AppException;
    
    
    public CouponForMARSDto getCouponByCouponNumber(String couponNumber) throws AppException;

	public AjaxResponse couponRedemption(CouponRedeemtionDto dto, AjaxResponse AjaxResponse) throws AppException;
	
	public List<CouponRedeem> getCouponRedeemListByCouponNumber(String couponNumber) throws AppException;
}
